<?php 
session_cache_expire(999999999);
if(!isset($_SESSION)) 
{ 
	session_start(); 
}
$lang = $_SESSION['lang'];
if (empty($lang) || $lang == "EN") {
	include "../value/value_en.php";
} else if($lang == "VN") {
	include "../value/value_vn.php";
}
else {
	include "../value/value_kr.php";
}
include '../operations/connection.php';	
$kq=0;
$idgroupAssets=$_REQUEST['idgroupAssets'];
$groupAssets=rawurldecode($_REQUEST['groupAssets']);


mysql_query("UPDATE `group_assets` SET `name`='".$groupAssets."' WHERE (`id`='".$idgroupAssets."')");


$group_assets=mysql_query("SELECT g.*,(SELECT COUNT(*) FROM assets a WHERE a.group=g.id ) as count FROM group_assets g ORDER BY g.name;");
$groupassets=array();
while ($r = mysql_fetch_array($group_assets)){
		$groupassets[]=array($r['id'],$r['name'],$r['count']);
}


mysql_close($connection);
?>
<td class="tdfirst"><?php echo $l_groupassets;?></td>
								<td style="width: 100px">
								<input type="hidden" id="kqgroupAssets" value="<?php echo $kq;?>" />
								<select name="groupAssets" id="groupAssets" style="font-size: 12px;height: 28px; width: 190px;padding: 4px;">
								<?php 
									$i=0;
									foreach ($groupassets as $value => $giatri)
									{
										?>
									<option value="<?php echo $giatri[0];?>" <?php if($groupAssets==$giatri[1]){echo 'selected="selected"'; }?> ><?php echo $giatri[1];?></option>
									<?php 
										$i++;
									}
														
									?>
								</select>
									<!--  <div style="float:left">
											<input type="text" size="30" name="groupAssets" id="groupAssets" value="<?php /*echo $groupassets[0][1];*/?>" onkeypress="return enterTable(event,this.id,'0')"  style="width: 185px;height: 24px; border: 1px solid #c4c0c9;font-size: 12px;line-height: 24px;" autocomplete="off" />
											
											<div class="suggestionsBox" id="suggestions" style="display:none;">
												<img src="images/upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
												<div class="suggestionList" id="autoSuggestionsList">
													&nbsp;
												</div>
											</div> 						
											</div>
											<div style=" float:left; position:relative; margin-top: 5px; margin-left: -21px">
												<img alt="" src="images/arrow-down.png" id="menu_expand" onkeypress="return enterTable(event,this.id,'0')" >
											    <div id="content_menu_expand" class="passul content_menu_expand" style="display:none">
											        <ul>
											        <?php 
											        
											    		
														$i=0;
														foreach ($groupassets as $value => $giatri)
														{
															?>
															<li onmouseover="this.style.cursor='pointer'"  onmouseout="this.style.cursor='default'" onclick="clickCustomer('<?=$giatri[1]?>')" 
																<?php 
																	if($i%2!=0){
																		?>
																		class="bgkhac"
																		<?php 
																	}
																?>
															> <?php echo $giatri[1];?></li>
															<?php 
															$i++;
														}
														
											    	?>
											        </ul>
											    </div>
											</div>	 -->
								
									
								</td>
								<td>
								<?php if(count($groupassets)>0){?>
									<a style="padding-left: 5px;" onclick="showdelgroupAssets()"><img src="images/del.png"  title="<?php echo $l_delgroupassets;?>" /></a>
									<a style="padding-left: 5px;" onclick="showeditgroupassets()"><img src="images/editn.png"  title="<?php echo $l_editgroupassets;?>" /></a>
								<?php }?>
									<a style="padding-left: 5px;" onclick="popup_window_show('#sample1', { pos : 'window-center', width : '320px', height:'800px'});"><img src="images/plus.png"  title="<?php echo $l_addgroupassets;?>" /></a>
								</td>